/*
 * @Description:
 * @Author: HYH
 * @LastEditors: HYH
 * @LastEditTime: 2023-07-07 08:42:01
 */
import request from '@/utils/request'


/**查询店铺sku库存记录列表*/
export function skuShopRecordsList(params) {
  return request({
    url: `/distribution/skuShopRecords/list`,
    params
  })
}

/**更新店铺销量*/
export function updateSales(data) {
  return request({
    url: `/distribution/skuShop/updateSales`,
    method: 'post',
    data
  })
}


/**推荐店铺库存*/
export function computeRecommendStock(data) {
  return request({
    url: `/distribution/skuShop/computeRecommendStock`,
    method: 'post',
    data
  })
}


/**更新推荐库存*/
export function updateStockByRecommendStock(data) {
  return request({
    url: `/distribution/skuShop/updateStockByRecommendStock`,
    method: 'post',
    data
  })
}




/**更新店铺库存管理开关、忽略库存推荐计算开关、最大店铺库存数量接口  */
export function updateSkuShopSetting(data) {
  return request({
    url: `/distribution/skuShop/updateSkuShopSetting`,
    method: 'post',
    data
  })
}

/**获取卖家SKU */
export function getSellerShopSku(params) {
  return request({
    url: `/distribution/skuShop/getSellerShopSku`,
    params
  })
}

/**根据组合ID获取组合SKU */
export function getCombinationSkuByCombinationId(combinationId) {
  return request({
    url: `/distribution/skuShop/getCombinationSkuByCombinationId?combinationId=${combinationId}`,
  })
}

/**查询店铺SKU关联列表 */
export function listSkuShop(query) {
  return request({
    url: '/distribution/skuShop/list',
    method: 'get',
    params: query
  })
}

/**查询店铺SKU关联详细 */
export function getSkuShop(id) {
  return request({
    url: '/distribution/skuShop/' + id,
  })
}

/**新增店铺SKU */
export function addSkuShop(data) {
  return request({
    url: '/distribution/skuShop/insertSkuShop',
    method: 'post',
    data: data
  })
}

/**修改店铺SKU关联 */
export function updateSkuShop(data) {
  return request({
    url: '/distribution/skuShop/updateSkuShop',
    method: 'post',
    data: data
  })
}

/**删除店铺SKU关联 */
export function delSkuShop(id) {
  return request({
    url: '/distribution/skuShop/' + id,
    method: 'delete'
  })
}


/**获取卖家所有店铺 */
export function getDistributorShopList(params) {
  return request({
    url: '/distribution/skuShop/getDistributorShopList',
    params
  })
}



/**获取卖家所有SKU */
export function getDistributorShopSkuList(params) {
  return request({
    url: '/distribution/skuShop/getDistributorShopSkuList',
    params
  })
}


/**获取卖家所有组合 */
export function getDistributorShopCombinationList(params) {
  return request({
    url: '/distribution/skuShop/getDistributorShopCombinationList',
    params
  })
}



/**导入 */
export function importShopSkuList(data) {
  return request({
    url: '/distribution/skuShop/importShopSku',
    method: 'POST',
    data
  })
}
